<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* toggle 选中的时候让他的下一个兄弟 span 的 after 的颜色变为红色 */
      /* ~ 后续的所有兄弟 */
      .toggle:checked + span::after {
        color: red;
      }
      span::after {
        content: 'Hello';
      }
      /* 选择到为空的标签 */
      :empty {
        display: block;
        height: 100px;
        width: 100px;
        background-color: red;
      }
    </style>
  </head>
  <body>
    <input type="checkbox" class="toggle" />
    <span></span>
    <span></span>
  </body>
</html>
